<template>
	<gracePage :customHeader="false">
		<!-- 页面主体 -->
		<view slot="gBody" class="grace-body">
			<view v-if="istrue" style="margin: 0 auto;">
				<view style="text-align: center;">
					<image style="width: 60px;height: 60px;margin-top: 100px;" src="../../static/menu_imgs/success.png" mode=""></image>
					<view style="font-weight: 600; margin-top: 35rpx; ">订单支付成功</view>
					<view></view>
				</view>
				<view style="width: 100%; position: fixed;bottom: 50px;">
					<view style="width: 100%;justify-content: space-around; display: flex;" >
						<view style="width: 110px; height: 35px;background-color: #51C50F;text-align: center;line-height: 35px;color: #FFFFFF;border-radius: 30px;" @tap="todingdan">查看订单</view>
						<view style="width: 110px; height: 35px;border:1px solid #51C50F;text-align: center;line-height: 35px;border-radius: 30px;" @tap="login">返回首页</view>
						
					</view>
				</view>
			</view>
			
			
			<view v-else style="margin: 0 auto;">
				<view style="text-align: center;">
					<image style="width: 60px;height: 60px;margin-top: 100px;" src="../../static/menu_imgs/failed.png" mode=""></image>
					<view style="font-weight: 600;margin-top: 35rpx; ">订单支付失败</view>
					<!-- <view>请在24小时之内完成订单，订单超时将会自动关闭</view> -->
					<view>支付失败，尚未未扣款，具体信息可以联系客服</view>
				</view>
				<view style="width: 100%; position: fixed;bottom: 50px;">
					<view style="width: 100%;justify-content: space-around;display: flex; " class="">
						<!-- <view style="width: 110px; height: 35px;background-color:#e92226;text-align: center;line-height: 35px;color: #FFFFFF;border-radius: 30px;font-weight: bold;font-size: 16px;" @tap="todingdan">查看订单</view> -->
						<view style="width: 110px; height: 35px;border:1px solid #e92226;text-align: center;line-height: 35px;border-radius: 30px;font-size: 16px" @tap="login">返回首页</view>
						
					</view>
				</view>
			</view>
		</view>
	</gracePage>
</template>
<script>

export default {
	data() {
		return {
			istrue:true
		}
	},
	onLoad(e) {
		if(e.type==0){
			this.istrue=false
		}
	},
	methods:{
		todingdan:function(){
			uni.navigateTo({
				url:"../my/order"
			})
		},
		comfirm:function(){
			uni.navigateTo({
				url:"comfirm"
			})
		},
		login:function(){
			uni.switchTab({
				url:"../index/index"
			})
		}
		
	},
	components:{
		
	}
}
</script>
<style>
.color-demo{text-align:center; width:212rpx; height:66rpx; font-size:22rpx; line-height:66rpx; border-radius:6rpx; background-color:#F6F7F8; margin:10rpx;}
</style>